An image processing apparatus has been known which acquires image data by reading a document and detects a document region from the image data. For example, the image processing apparatus acquires an image containing a document region, detects coordinate values of edge candidate pixels based on the obtained image, calculates the tilting of the document region based on the detected coordinate values of the edge candidate pixels, and extracts coordinate values of edge end candidate pixels based on the detected coordinate values of the edge candidate pixels. Then, the image processing apparatus calculates a line corresponding to an edge based on the calculated tilting of the document region and the extracted coordinate values of edge end candidate pixels, and corrects the tilting of the document region on the basis of the calculated line corresponding to the edge, and crops the document region from the image based on the relevant straight line.
As a related art, a stamp detector has been known which detects a shadow that appears on an image acquired by reading a paper sheet, the shadow being caused by the thickness of a stamp stuck onto the paper sheet, and detects the position of the whole stamp based on the detected shadow.
Related art is disclosed in Japanese Laid-open Patent Publications No. 2009-218953 and No. 2004-5051.